#/usr/bin/env python

import unittest
from ChessBoard import *

centre_bishops =  ((0,6), (1,6), (2,6), (3,6), (4,6), (5,6), (6,6), (7,6))

class testGetValidBishopMoves(unittest.TestCase):
    def setUp(self):
        self.chessboard = ChessBoard()
        self.chessboard.resetBoard()

    def testGetValidBishopMovesWhereOnlyTwoMoves(self):
	print "Entered our first test method"
        self.assertEquals(self.chessboard.getValidBishopMoves((0,2)),[(1, 3), (2, 4), (3, 5), (1, 1)])
        self.chessboard.printBoard()

    def testGetValidBishopMovesWhereFourMoves(self):
        print "Entered our second test method"
        self.assertEquals(self.chessboard.getValidBishopMoves((2,2)),[(3, 3), (4, 4), (5, 5), (1, 3), (0, 4), (3, 1), (1, 1)])

    def testGetValidBishopMovesForCornerSquares(self):
        print "Entered our third test method"
        self.assertEquals(self.chessboard.getValidBishopMoves((0,0)),[(1, 1)])
        self.assertEquals(self.chessboard.getValidBishopMoves((7,0)),[(6, 1)])

#    def testGetValidBishopMovesForCentreSquares(self):
#        print "Test the centre squares that return 4 different values"
#        for bishop in centre_bishops:
#            (x,y) = bishop
#            self.assertEquals(self.chessboard.getValidBishopMoves(bishop),((x-1,y-1),(x-1,y+1),(x+1,y-1),(x+1,y+1)))

	

    def tearDown(self):
        self.chessboard = None

if __name__ == "__main__":
    unittest.main()

